package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @author Zhang Maojie
 * @date 2024/3/23 16:29
 */
@Mapper
public interface UserMapper {
    //根据openid差数据
    @Select("select * from user where openid=#{openid}")
    User getByOpenid(String openid);

    void insert(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);


    //动态查询用户统计
    Integer countByMap(Map map);
}
